<template>
	<view :data-theme='theme()' :class="'order-datail pb100 ' + theme()">
		<!-- v-if="loadding" -->
		<!--详情状态-->
		<block v-if="tokendata1">
			<view class="order-state d-s-c">
				<view class="icon-box">
					<span v-if="detail.state_text == '已付款，待发货'" class="icon iconfont icon-icon"></span>
					<span v-if="detail.state_text == '待付款'" class="icon iconfont icon-icon"></span>
					<span v-if="detail.state_text == '已发货，待收货'" class="icon iconfont icon-daishouhuo"></span>
					<span v-if="detail.state_text == '已完成'" class="icon iconfont icon-xuanze"></span>
					<span v-if="detail.state_text == '已取消'" class="icon iconfont icon-gantanhao"></span>
				</view>
				<view class="state-cont flex-1">
					<view class="state-txt d-b-c">
						<!-- <text class="desc f34">{{ detail.order_status.value == 40?'已驳回': detail.state_text == '待支付押金'? '待审核' : detail.state_text }}</text> -->
						<text class="desc f34">{{ detail.order_status.value == 40 ? '已驳回' : detail.state_text }}</text>
					</view>
					<view class="countdown-datetime" v-if="detail.pay_end_time">
						<text>剩{{ detail.pay_end_time }}自动关闭</text>
					</view>
				</view>
				<view class="dot-bg"></view>

			</view>

			<view class="order-express" style="border-radius: 12rpx; overflow: hidden;"
				v-if="detail.delivery_type.value == 10">
				<my-info :exist_address="detail.address" ></my-info>
			</view>
			<!-- 上门自提：自提门店 -->
			<view class="order-express p30 d-s-s" v-if="detail.delivery_type.value == 20">
				<view class="flow-delivery__title m-top20"><span class="icon iconfont icon-dizhi1">自提门店</span></view>
				<view class="cont-text flex-1 o-h ml20 f30">
					<view class="express-text">
						{{ extractStore.store_name }} {{ extractStore.phone }}
						<view class="f24 gray9 pt10">
							{{ extractStore.region.province }} {{ extractStore.region.city }}
							{{ extractStore.region.region }} {{ extractStore.address }}
						</view>
					</view>
				</view>
			</view>

			<template v-if="detail.car_lease != 1">
				<!-- 物流信息 -->
				<view class="group bg-white"
					v-if="(detail.delivery_type.value == 10 && detail.delivery_status.value == 20) && detail.order_status.value != 30 && detail.order_status.value != 31 && detail.order_status.value != 32 && detail.order_status.value != 11 && detail.order_status.value != 12"
					@click="gotoExpress(detail.order_id)">
					<view class="d-b-c">
						<view class="f28">
							<view class="p-20-0">
								<text class="gray9">物流公司：</text>
								<text>{{ detail.express.express_name }}</text>
							</view>
							<view class="p-20-0">
								<text class="gray9">物流单号：</text>
								<text>{{ detail.express_no }}</text>
							</view>
						</view>
						<view><text class="icon iconfont icon-jiantou"></text></view>
					</view>
				</view>
			</template>
			<!--购物列表-->
			<view class="shops group bg-white"
				style="margin-bottom: 0; border-bottom-left-radius: 0; border-bottom-right-radius: 0;">
				<!-- <view class="group-hd border-b-e"
				@tap="gotoPage('/pages/shop/shop?shop_supplier_id='+detail.supplier.shop_supplier_id)">
				<view class="left ">
					<i class="icon iconfont icon-dianpu1"></i>
					<text class="min-name">{{detail.supplier.name}}</text>
					<text class="icon iconfont icon-jiantou"></text>
				</view>
			</view> -->
				<view class="list">
					<view class="one-product" v-for="(item, index) in detail.product" :key="index"
						style="margin-top: 20rpx;">
						<view class="d-f">
							<view class="cover_img" style="border: 1rpx solid #f8f8f8; border-radius: 10rpx;">
								<image :src="item.image.file_path" mode="aspectFit"></image>
							</view>
							<view class="info flex-1 p-0-20">
								<view class="d-b-s">
									<view class="flex-1">
										<view class="title f32 gray3 " style="font-weight:700">
											{{ formatStr(item.product_name, 40) }}
										</view>
										<view class="describe mt20 f28" style="font-size: 22rpx;color: #B1B1B1;"
											v-if="item.spec_type == 20">
											{{ item.product_attr }}
										</view>
										<view class="mt10 f20" style="color: #B1B1B1;">数量：{{ item.total_num }}</view>
									</view>
								</view>
							</view>
						</view>
						<!-- 						<view class="mt10 tr f28" v-if="item.is_user_grade==true">
							<text class="theme-price f26">会员折扣价：</text>
							<text class="theme-price f32">{{item.grade_product_price}}</text>
						</view> -->
						<view class="pt10 d-e-c" v-if="source == 'user' && (item.refund || detail.isAllowRefund)">
							<!-- 申请售后 -->
							<view class="m-top20 dis-flex flex-x-end">
								<text v-if="item.refund">已申请售后</text>
								<view v-else-if="detail.isAllowRefund" @click="onApplyRefund(item.order_product_id)">
									<button type="default">申请售后</button>
								</view>
							</view>
						</view>
					</view>
				</view>
			</view>

			<!-- 起始时间 -->
			<view class="tis" style="background-color: #fff;">
				<view class="qz d-b-c ">
					<view class="biank3 d-b-c">
						<view class="">
							<image :src="app_url + '/image/wxpng/zlks.png'" mode="aspectFit"></image>
						</view>
						<view class="cont d-s-s d-c ml20">
							<view class="sq1">
								预计起租日
							</view>
							<view class="sq2 mt10">
								{{ detail.start_time }}
							</view>
						</view>
					</view>
					<view class="biank3 d-b-c ">
						<image :src="app_url + '/image/wxpng/zljs.png'" mode="aspectFit"></image>
						<view class="cont d-s-s d-c ml20">
							<view class="sq1">
								到期日
							</view>
							<view class="sq2 mt10">
								{{ detail.end_time }}
							</view>
						</view>
					</view>
				</view>
			</view>
			<!-- 提示 -->
			<view class="tis">
				<view class="tishi p10">提示：一般货物会在24小时内发出，如有特殊情况，客服会主动联系告知；快递运输期间不算租期，实际起租日为订单日后推3天</view>
			</view>

			<!-- 备注-->
			<!-- 			<view class="group bg-white">
				<view class="beizhu1">
					<view>备注</view>
				</view>
			</view> -->
			<!-- 备注-->
			<view class="group bg-white" v-if="detail.order_returned">
				<!-- <view class="group bg-white"> -->
				<view class="beizhu1 content" @click="goReturn"
					style="display: flex;justify-content: space-between;align-items: center;">
					<view class="left">归还驳回信息</view>
					<view class="right">
						<!-- <u-icon name="arrow-right"></u-icon> -->
						<button @click="goReturn()"
							style="text-align: left;font-size:20rpx;background-color: #1296db;color: #FFFFFF;">查看详情</button>
					</view>
				</view>
			</view>

			<!-- 			<view class="m20" style="line-height: 60rpx; padding: 0 40rpx; background-color: #fff; color: #aaa;">
				<view class="d-r d-b-c">
					<view class="f28">预计起租日</view>
					<view class="f28">{{detail.start_time || '暂无日期'}}</view>
				</view>
				<view class="d-r d-b-c">
					<view class="f28">到期日</view>
					<view class="f28">{{detail.end_time || '暂无日期'}}</view>
				</view>
			</view> -->

			<!-- 租金-->
			<view class="group bg-white" style="color: #999;">
				<view class="ww100">
					<view style="display: flex;justify-content: space-between;">
						<view class="mb20 f26">首期应付金额</view>
						<view style="color: #B1B1B1;" class="f26">￥{{ orderBill[0].price || '0.00' }}</view>
					</view>
					<view style="display: flex;justify-content: space-between;">
						<view class="mb20 f26">首期租金</view>
						<view style="color: #B1B1B1;" class="f26">
							￥{{ orderBill[0].price }} </view>
						<!-- 			<view style="color: #B1B1B1;font-size: 28rpx;" v-else>￥{{orderBill[0].rent_price || '0.00'}}-2222
						</view> -->
					</view>
					<!-- 				<view style="display: flex;justify-content: space-between;">
						<view class="mb20" style="font-size: 28rpx;">碎屏保障服务</view>
						<view style="color: #B1B1B1;font-size: 28rpx;">
							￥{{formatStr(orderBill[0].screen_breakage_risk_price,
							'money')}}</view>
					</view> -->
					<view style="display: flex;justify-content: space-between;">
						<view class="mb20 f26">剩余租金</view>
						<view style="color: #B1B1B1" class="f26">￥{{ detail.unpay_price }}</view>
					</view>
					<view style="display: flex;justify-content: space-between;">
						<view class="mb20 f26">总租金</view>
						<view style="color: #B1B1B1;" class="f26">￥{{ detail.bill_price }}</view>
					</view>
					<view style="display: flex;justify-content: space-between;">
						<view class="mb20 f26">买断价</view>
						<view style="color: #B1B1B1;" class="f26">￥{{ detail.buyOutPrice || '0.00' }}</view>
					</view>
					<view style="display: flex;justify-content: space-between;">
						<view class="mb20 f26">配送方式</view>
						<view style="color: #B1B1B1;" class="f26">寄出包邮/顺丰包邮 </view>
					</view>
				</view>
			</view>

			<!-- 押金-->
			<view class="group bg-white" v-if="detail.order_status.value != 10">
				<view
					style="display: flex;justify-content: space-between;font-weight: 700;border-bottom: 1rpx solid #B1B1B1;margin: 10rpx 0;">
					<view class="mb20" style="color: black;font-size: 36rpx;">冻结押金</view>
					<view style="color: black;font-size: 34rpx;">￥{{ detail.auth_no == '' ? '0.00' : detail.deposit }}</view>
				</view>
				<view class="ww100 mt20" style="color: #999;">
					<view style="display: flex;justify-content: space-between;">
						<view class="mb20" style="font-size: 28rpx;">商品押金</view>
						<view style="color: #B1B1B1;font-size: 32rpx;">￥{{ detail.auth_no == '' ? '0.00' : detail.deposit }}
						</view>
					</view>
					<view style="display: flex;justify-content: space-between;">
						<view class="mb20" style="font-size: 28rpx;">芝麻信用免押金</view>
						<view style="color: #B1B1B1;font-size: 32rpx;">￥0.00</view>
					</view>
					<view style="display: flex;justify-content: space-between;">
						<view class="mb20" style="font-size: 28rpx;">支付宝冻结押金</view>
						<view style="color: #B1B1B1;font-size: 32rpx;">￥{{ detail.auth_no == '' ? '0.00' : detail.deposit }}
						</view>
					</view>
					<view style="display: flex;justify-content: space-between;">
						<view class="mb20" style="font-size: 28rpx;">押金冻结方式</view>
						<view style="color: #B1B1B1;font-size: 32rpx;">支付宝资金授权 </view>
					</view>
				</view>
			</view>
			<view class="group bg-white" v-if="order_service.length > 0">
				<view
					style="display: flex;justify-content: space-between;font-weight: 700;border-bottom: 1rpx solid #B1B1B1;margin: 10rpx 0;">
					<view class="mb20" style="color: black;font-size: 36rpx;">增值服务</view>
					<view style="color: black;font-size: 34rpx;">￥{{ order_service_price }}</view>
				</view>
				<view class="ww100 mt20" style="color: #999;">
					<view style="display: flex;justify-content: space-between;" v-for="(item, index) in order_service"
						:key="index">
						<view class="mb20" style="font-size: 28rpx;">{{ item.service_name }}</view>
						<view style="color: #B1B1B1;font-size: 32rpx;">￥{{ item.service_price }}
							({{ item.pay_status == 0 ? '未支付' : '已支付' }})
						</view>
					</view>
				</view>
			</view>
			<!-- 优惠券-->
			<view class="group bg-white">
				<view style="display: flex;justify-content: space-between;font-weight: 700;">
					<view style="color: black;font-size: 36rpx;">优惠券可减免金额</view>
					<view style="color: black;font-size: 34rpx;">￥{{ detail.coupon_money }}</view>
				</view>
			</view>


			<!--订单信息-->
			<!-- <view class="group bg-white f26">
			<view class="p-20-0">
				<text class="">订单编号：</text>
				<text>{{ detail.order_no }}</text>
			</view>
			<view class="p-20-0">
				<text class="">下单时间：</text>
				<text>{{ detail.create_time }}</text>
			</view>
			<view class="p-20-0">
				<text class="">支付方式：</text>
				<text>{{ detail.pay_type.text }}</text>
			</view>
			<view class="p-20-0">
				<text class="">配送方式：</text>
				<text>{{ detail.delivery_type.text }}</text>
			</view>
			<view class="p-20-0"
				v-if="detail.delivery_type.value==30 && detail.order_status.value==30 && detail.virtual_content !=''">
				<text class="">发货信息：</text>
				<text>{{ detail.virtual_content }}</text>
			</view>
			<view class="p-20-0">
				<text class="">备注：</text>
				<text>{{ detail.buyer_remark }}</text>
			</view>
			<view class="p-20-0" v-if="detail.order_status.value==20 && detail.cancel_remark !=''">
				<text class="">商家备注：</text>
				<text>{{ detail.cancel_remark }}</text>
			</view>
			<view v-if="service_open&&detail.supplier.user_id!=user_id" class="p-20-0 kefu" @click="tochat">
				<text class="icon iconfont icon-kefu2"></text>
				<text class="">联系卖家</text>
			</view>
		</view> -->
			<!-- 分期付款 -->
			<view class="group bg-white f28" v-if="detail.order_status.value == 10">
				<view class="items p-10-0" v-for="(item, index) in orderBill" :key="item.bill_id">
					<view>第{{ item.current_period }}期</view>
					<view>{{ item.repayment_date | formatDate }}</view>
					<view class="price">{{ item.price }}</view>
				</view>
				<view class="items p-10-0" v-if='detail.lease_type == 2'>
					<view>买断价</view>
					<view> - </view>
				</view>
			</view>

			<view class="group bg-white f26 " style="color: #999;">
				<view class="p-10-0 d-b-c">
					<text class="">商品总价</text>
					<text>¥ {{ detail.bill_price }}</text>
				</view>
				<view class="p-10-0 d-b-c">
					<text class="">运费</text>
					<text>¥ {{ detail.express_price }}</text>
				</view>
				<view class="p-10-0 d-b-c">
					<text class="">押金</text>
					<!-- <text>¥ {{ detail.yushou }}</text> -->
					<text>¥ 0.00</text>
				</view>
				<!-- <view class="p-20-0 d-b-c" v-if="suiping">
				<text class="">已选碎屏险</text>
				<text>￥499 </text>
			</view> -->
				<view class="p-10-0 d-b-c" v-if="detail.product_reduce_money > 0">
					<text class="">商品立减</text>
					<text>-¥ {{ detail.product_reduce_money }}</text>
				</view>
				<view class="p-10-0 d-b-c" v-if="detail.points_money > 0">
					<text class="">积分抵扣金额：</text>
					<text class="theme-price">- ¥{{ detail.points_money }}</text>
				</view>
				<view class="p-10-0 d-b-c" v-if="detail.coupon_money > 0">
					<text class="">店铺优惠券</text>
					<text class="theme-price">- ¥ {{ detail.coupon_money }}</text>
				</view>
				<view class="p-10-0 d-b-c" v-if="detail.coupon_money_sys > 0">
					<text class="">平台优惠券</text>
					<text class="theme-price">- ¥ {{ detail.coupon_money_sys }}</text>
				</view>
				<view class="p-10-0 d-b-c" v-if="detail.fullreduce_money > 0">
					<text class="">店铺满减</text>
					<text class="theme-price">- ¥ {{ detail.fullreduce_money }}</text>
				</view>
				<view class="p-10-0 d-e-c fb f34" style="color: #000;">
					<text class="">已付金额</text>
					<text class="theme-price">
						¥ {{ priceJg }}
					</text>
				</view>
			</view>

			<!-- 订单编号-->
			<view class="group bg-white">
				<view class="ww100">
					<view style="display: flex;justify-content: space-between;">
						<view class="mb20" style="font-size: 28rpx;">订单编号</view>
						<view style="color: #B1B1B1;font-size: 28rpx; display: flex;" @click='fuzhi(detail.order_no)'>
							{{ detail.order_no }}
							<view style='margin-left: 10rpx;color: #61B0E4;'>复制</view>
						</view>
					</view>
					<view style="display: flex;justify-content: space-between;">
						<view style="font-size: 28rpx;">创建时间</view>
						<view style="color: #B1B1B1;font-size: 28rpx;">{{ detail.create_time }}</view>
					</view>
				</view>
			</view>

			<!-- <view class="group bg-white"
				v-if="detail.pay_status.value == 20 && detail.delivery_type.value == 10 && detail.order_status.value==10&&detail.delivery_status.value == 10&&source=='supplier'">
				<view class="f32 fb p-0-20">去发货</view>
				<view class="table-item">
					<view class="d-s-c make-top">
						<view class="fb color-28 f26 mr20">物流公司</view>
					</view>
					<view class="">
						<picker class="" value="" @change="changeSelect($event)" :range="expressList"
							range-key='express_name'>
							<view class="selectpicker">
								<view class="make-item input-box flex-1">{{express_name|| '请选择'}}</view>
								<view class="icon iconfont icon-jiantou"></view>
							</view>
						</picker>
					</view>
				</view>
				<view class="table-item">
					<view class="d-s-c make-top">
						<view class="fb color-28 f26 mr20">物流单号</view>
					</view>
					<view class="pr">
						<input class="make-item selectpicker input-box" v-model="express_no" type="text"
							placeholder="请输入" />
					</view>
				</view>
				<view></view>
				<view><button type="default" class="btn-blue send_btn" @click="sendPro">确认发货</button></view>
			</view> -->
			<view v-if="detail.pay_status.value == 20 && detail.order_status.value == 21 && source == 'supplier'">
				<view class="f32 fb p-0-20 mb20 mt20">用户取消订单</view>
				<view class="red p-0-20 mb20">当前买家已付款申请取消订单,请审核是否同意，如同意则自动退回付款金额(微信支付原路退款)并关闭订单</view>
				<view class="p-0-20">
					<view class="d-s-c mb20">
						<view class="make-top w120 mr10">
							<view class="fb color-28 f26">审核状态</view>
						</view>
						<radio-group class="d-a-c" @change="changeRadio($event)">
							<label class="d-s-c make-item ">
								<view>
									<radio style="transform:scale(0.7)" color="#ff6633" :checked="status == 1" :value="1" />
								</view>
								<view class="f26 color-57">同意</view>
							</label>
							<label class="d-s-c make-item ">
								<view>
									<radio style="transform:scale(0.7)" color="#ff6633" :checked="status == 0" :value="0" />
								</view>
								<view class="f26 color-57">拒绝</view>
							</label>
						</radio-group>
					</view>
					<view v-if="status == 0" class="d-s-c mb20">
						<view class="w120 mr10">拒绝原因</view>
						<input type="text" class="make-item selectpicker input-box" v-model="cancel_refuse" />
					</view>
				</view>
				<view><button class="theme-btn send_btn" @click="Cancel">确认</button></view>
			</view>
			<u-popup :show="showqx" mode="bottom" @close="close" :closeable="true" :round="16" :close-color="'#000000'"
				:close-size="24">
				<view >
					<scroll-view scroll-y="true" style="height: 675rpx;" >
						<view class="yuanyin">请选择取消原因</view>
						<view class="fxuankuang">
							<u-radio-group v-model="checkboxValue1" placement="column" @change="checkboxChange">
								<u-radio :customStyle="{ height: '76rpx', fontWeight: '700' }" v-for="(item, index) in checkboxList1"
									:key="index" :label="item.name" :name="item.name" :label-color="'#252628'"
									:label-size="'14'" :icon-size="'14'" :active-color="'#11A0AE'">
								</u-radio>
							</u-radio-group>
						</view>
						<view class="anniuXq">
							<button @click="queding" class="anniu-confim">确认</button>
							<button @click="close">取消</button>
						</view>
					</scroll-view>
					
				</view>
			</u-popup>
			<Mpservice v-if="isMpservice" :isMpservice="isMpservice" :shopSupplierId="detail.supplier.shop_supplier_id"
				@close="closeMpservice">
			</Mpservice>
			<view class="mat" style="width: 100%; height: 50rpx;"></view>
		</block>
		<block v-else>
			<view class="p30" style="text-align: center;">
				<text class="iconfont icon-wushuju"></text>
				<text class="cont">亲，还没有登录哦</text>
				<view style="display: flex;justify-content:center;align-items:center;">
					<button
						style="border: 1rpx solid black; font-size: 26rpx; width: 200rpx; border-radius: 60rpx;height: 60rpx; line-height: 60rpx;color: black; margin: 20rpx 0;"
						@getAuthorize="onGetAuthorize1" open-type="getAuthorize" scope="phoneNumber"
						onError="handleAuthError">
						一键授权登录
					</button>
				</view>

			</view>

		</block>
		<u-popup ref="popup" type="bottom">
			<view class="Choose">
				<view class="method">
					<view class="">

					</view>
					<view class="" @click="electa">
						确认
					</view>
				</view>
				<picker-view :indicator-style="indicatorStyle" :value="value" @change="bindChange" class="picker-view">
					<picker-view-column>
						<view class="item" v-for="(item, index) in protoecl" :key="index">{{ item.bank_name }}</view>
					</picker-view-column>
				</picker-view>
			</view>
		</u-popup>

	</view>
</template>

<script>
import config from "@/config.js"
import Popup from '@/components/uni-popup.vue';
import MyInfo from './confirm-order/address/changeadress.vue';
import {
	pay
} from '@/common/pay.js';
import Mpservice from '@/components/mpservice/Mpservice.vue';

async function clickMoreButtonsBox(event) {
	if (event.target.id) {
		switch (event.target.id) {
			case "cancelButton":
				this.cancelOrder(this.detail.order_id, this.detail.state_text);
				break;
			case "buyOut":
				this.maiduan(this.detail.order_id);
				break;
			case "flowReport":
				this.clickflowReport();
				break;
			case "applyRelate":
				this.applyRelate(this.detail);
				break;
			default:
				break;
		}
	}
	this.moreVisible = false;
}

export default {
	data() {
		return {
			app_url: config.app_url,
			// 展示“更多”按钮
			moreVisible: false,
			tokendata1: "",
			state_text: "",
			TotalPriceGoods: "",
			qurzshow: true,
			timer: null, //定时器名称
			suiping: false,
			payable: "",
			priceJg: "",
			checkboxValue1: [],
			// 基本案列数据
			checkboxList1: [{
				name: '押金过高',
				disabled: false
			},
			{
				name: '更改订单信息',
				disabled: false
			},
			{
				name: '预收押金/补押金',
				disabled: false
			},
			{
				name: '审核时间过长',
				disabled: false
			},
			{
				name: '商家没货/服务态度问题',
				disabled: false
			},
			{
				name: '运费问题',
				disabled: false
			}
			],
			showqx: false,
			priceWF: "",
			start_time: '',
			end_time: '',
			buyOutPricedata: "",
			hasrenzheng_id: "",
			portrait: "",
			// 商品总价
			numTitol: "",
			/*是否加载完成*/
			loadding: true,
			indicatorDots: true,
			autoplay: true,
			interval: 2000,
			duration: 500,
			/*是否显示支付类别弹窗*/
			isPayPopup: false,
			/*订单id*/
			order_id: 0,
			// 还款期数
			orderBill: [
				{
					price: ''
				}
			],
			/*订单详情*/
			detail: {
				order_status: [],
				address: {
					region: []
				},
				product: [],
				pay_type: [],
				delivery_type: [],
				pay_status: [],
				buyOutPrice: '',
			},
			extractStore: {},
			source: 'user',
			service_open: 0,
			service_type: 10,
			isMpservice: false,
			/*是否显示支付宝支付，只有在h5，非微信内打开才显示*/
			showAlipay: false,
			user_id: 0,
			expressList: [],
			express_id: '',
			express_name: '',
			express_no: '',
			status: 1,
			cancel_refuse: '',
			pay_type: 10,
			// 银行卡id
			bct_protocol_no: '',
			// 银行卡列表
			protoecl: '',
			bill_id: '',
			types_of: 0,
			signStr: '',
			ant_status: '',
			flowId: '',
			accountId: '',
			sign_str_status: '',
			signNo: '',
			querySignFlow_status: '',
			folwid: '',
			is_user: '',
			isOverflow: false,
			viewWidth: 0,
			isShouqi: false,
			count: 0,
			shouqiVisile: false,
			deposit: false,
			folwid3: "",
			order_service: [],
			order_service_price: '',
			fasuzheng: ''
		};
	},
	components: {
		Popup,
		Mpservice,
		MyInfo
	},
	computed: {

	},
	onLoad(e) {
		console.log(e, 'query')
		this.tokendata1 = uni.getStorageSync('token');
		console.log("tokendata", this.tokendata1);
		this.order_id = e.order_id;
		this.user_id = uni.getStorageSync('user_id');
		if (e.source) {
			this.source = e.source;
		}
		// this.getCardList()
	},
	onShow() {
		uni.setStorageSync("storepickup", '');
		uni.showLoading({
			title: '加载中'
		});
		/*获取订单详情*/
		this.getData();

	},
	mounted() {
		uni.showLoading({
			title: '加载中'
		});
		/*获取订单详情*/
		this.getData();
		this.visibleButtonCount()
		this.deposit = uni.getStorageSync('deposit')
	},
	filters: {
		// 过滤器
		formatDate(value) {
			let date = new Date(value * 1000);
			//时间戳为10位需*1000，时间戳为13位的话不需乘1000
			let y = date.getFullYear();
			let MM = date.getMonth() + 1;
			MM = MM < 10 ? ('0' + MM) : MM; //月补0
			let d = date.getDate();
			d = d < 10 ? ('0' + d) : d; //天补0
			let h = date.getHours();
			h = h < 10 ? ('0' + h) : h; //小时补0
			let m = date.getMinutes();
			m = m < 10 ? ('0' + m) : m; //分钟补0
			let s = date.getSeconds();
			s = s < 10 ? ('0' + s) : s; //秒补0
			return y + '-' + MM + '-' + d; //年月日
			// return y + '-' + MM + '-' + d + ' ' + h + ':' + m + ':' + s; //年月日时分秒
		},
	},
	methods: {
		gotoContract(e) {
			uni.navigateTo({
				url: "/pages/order/contract?order_id=" + e
			})
		},
		orderByDocTemplate() {
			if (this.fasuzheng) {
				window.location.href = this.fasuzheng.weiXinUrlHttp
			}
		},
		goReturn() {
			uni.navigateTo({
				url: "/pages/order/nix-return?order_id=" + this.order_id
			})
		},
		minayang() {
			let self = this
			self._post(
				'mianyang.index/orderPToP', {
				appType: 12,
				order_id: self.order_id
			},
				function (res) {
					console.log(res)
					// my.navigateToMiniProgram({
					// 	appId: '2021004106675225',
					// 	path: '/pages/micro-police/index',
					// 	extraData: {
					// 		apply_No: tape.apply_No,
					// 		applicant_Name: tape.username,
					// 		id_Number: tape.usernum,
					// 		is_Auto: 0,
					// 		apply_Type: 7,
					// 	}
					// })
				}
			);
		},
		applyRelate(e) {
			uni.setStorageSync('reletproduct', this.detail.product[0]);
			uni.navigateTo({
				url: `/pages/order/relet?start_time=${this.detail.start_time}&end_time=${this.detail.end_time}&order_id=${e.order_id}&order_no=${e.order_no}&bill_price=${e.bill_price}`
			})
		},
		shouQiClick() {
			let self = this
			self.shouqiVisile = true
		},
		visibleButtonCount() {
			// 逐一检查每个按钮的条件（根据实际字段调整）

			let self = this
			console.log(self.folwid3 !== '' && self.detail.is_user3 == 1);
			if (self.qurzshow && self.detail.apply_Status === 'Verified') self.count++; // 公证核验
			if (self.qurzshow && self.detail.order_surety_status === 1) self.count++; // 担保核验
			if (self.detail.auth_no === '' && self.detail.order_status.value < 10) self.count++; // 去付款
			if (self.detail.user_url !== '' && self.detail.is_user === 1) self.count++; // 签署租赁合同
			if (self.signNo && self.sign_str_status == 'UNSIGNED' && self.querySignFlow_status == 'FINISH') self
				.count++; // 代扣签约
			if (self.flowId && self.accountId && self.sign_str_status == 'UNSIGNED' && self.querySignFlow_status !==
				'FINISH') self.count++; // 签署合同 
			if (self.folwid3 !== '' && self.detail.is_user3 == 1) self.count++
			if (self.count > 0) {
				self.isShouqi = true
			}
			console.log(self.count, 'count');
			console.log(self.isShouqi, 'isShouqi')
		},
		goUrl() {
			if (this.detail.order_surety_url !== '') {
				// my.ap.openURL({
				// 	url: this.detail.order_surety_url,
				// 	success: (res) => {
				// 		console.log('openURL success', res)
				// 	},
				// 	fail: (err) => {
				// 		console.log('openURL success', err)
				// 	}
				// });
				uni.showToast({
					title: '已发送到您的短信，请注意查收！',
					duration: 2000,
					icon: 'none'
				});
			} else {
				uni.navigateTo({
					url: "/pages/order/noteRefusal?order_id=" + this.order_id
				})
			}

		},
		clickMoreButtonsBox,
		/** 点击更多按钮的盒子 */
		formatStr(str, type /*'date'|'money'|'week'|num */) {
			if (type === 'date')
				return str.substring(0, 10);
			if (typeof type === 'number')
				return `${str.substring(0, type)}...`;
			if (type === 'money')
				return str ? str : '-';
		},
		// 查询绑卡状态
		getCardList() {
			this._post('baocaitong.BctPayApi/getBindCardList', {}, res => {
				console.log(res);
				this.protoecl = res.data
				this.bct_protocol_no = res.data[0].bct_protocol_no
			})
		},
		bindChange(video) {
			console.log(video.detail.value[0]);
			this.bct_protocol_no = this.protoecl[video.detail.value[0]].bct_protocol_no
		},
		// orderByDocTemplate(url) {
		// 	console.log(url, '-----------')
		// 	my.ap.openURL({
		// 		url: url,
		// 		success: (res) => {
		// 			console.log('openURL success', res)
		// 		},
		// 		fail: (err) => {
		// 			console.log('openURL success', err)
		// 		}
		// 	});
		// },
		// 公证
		/*
		 *  广邦   2021004138655183
		 *  惠来   2021004106675225
		 */
		fication(tape) {
			console.log(tape, 'tape')
			my.navigateToMiniProgram({
				appId: '2021004106675225',
				path: '/pages/micro-police/index',
				extraData: {
					apply_No: tape.apply_No,
					applicant_Name: tape.username,
					id_Number: tape.usernum,
					is_Auto: 0,
					apply_Type: 7,
				}
			})
			return
			console.log(1111)
			window.location.href = `https://ds.alipay.com/?scheme=` +
				encodeURIComponent(
					`alipays://platformapi/startapp?appId=2021004106637059&page=pages/micro-police/index&query=${encodeURIComponent(`apply_No=${tape.apply_No}&applicant_Name=${tape.username}&id_Number=${tape.usernum}&is_Auto=0&apply_Type=7`)}`
				)
		},
		orderChainEQB() {
			console.log(this.flowId, this.accountId, '=--------asd---99999');
			let flowId = this.flowId
			let accountId = this.accountId
			let env = 'prod'
			// let env = 'sml'
			let skipResult = true
			let skipGuide = false
			console.log('plugin://esign/esign?env=' + env + '&skipResult=' + skipResult + '&skipGuide' + skipGuide +
				'&flowId' + flowId + '&signerId' + accountId, '=-------000000000000099');
			// my.navigateTo({
			// 	url: 'plugin://esign/esign?env=' + env + '&skipResult=' + skipResult + '&skipGuide=' +
			// 		skipGuide + '&flowId=' + flowId + '&signerId=' + accountId,
			// })
			my.navigateTo({
				url: `plugin://esign/esign?env=${env}&skipResult=${skipResult}&skipGuide=${skipGuide}&flowId=${flowId}&signerId=${accountId}`,
			})
		},
		// 签约蚂蚁链代扣
		/*
		 * 广邦、  2021004145647049 	    merchantId: "2088641270025605",
		 * 惠来、  2021004137655397  	merchantId: "2088841042140332",
		 * 畅行租  2021004144637508  	merchantId："2088640028032450",
		 * 更换appid
		 * 
		 * tenantId   广邦：生产：XVSZFWAD  
		 * 			  惠来：生产：GENUZFHR
		 * 			  畅行租：生产：LQIJFPLO       
		 */
		orderChain(row) {
			let self = this
			console.log(self.signStr, 'singStr')
			if (self.signStr) {
				my.navigateToMiniProgram({
					appId: "2021001152620480", // 区块链合同真实appId
					path: "pages/tripartite/index", // 支付宝商家跳转区块链合同代扣签署地址（真实路径
					query: {
						signStr: self.signStr,
						tenantId: "SA-lWIG7RSBHk",
						merchantId: "2088941579492028",
						orderId: row,
						redirectUrl: "alipays://platformapi/startapp?appId=2021004188685648&page=pages/index/index", // 代扣签署成功/失败回跳地址，示例 alipays://platformapi/startapp?appId=2021004108689505&page=pages/home/index，appId 和 page 需要根据实际情况调整真实数值
					}, // 需要携带的必要参数
					success: () => {
						console.log('成功');
					},
					fail: () => {
						console.log('失败');
					},
				});
			} else {
				self._post(
					'order.orderchain/withhold', {
					signNo: self.signNo,
					order_id: row
				},
					function (res) {
						let signStr1 = res.data.createWithholdSign.signStr
						my.navigateToMiniProgram({
							appId: "2021001152620480", // 区块链合同真实appId
							path: "pages/tripartite/index", // 支付宝商家跳转区块链合同代扣签署地址（真实路径
							query: {
								signStr: signStr1,
								tenantId: "SA-lWIG7RSBHk",
								merchantId: "2088941579492028",
								orderId: row,
								redirectUrl: "alipays://platformapi/startapp?appId=2021004188685648&page=pages/index/index", // 代扣签署成功/失败回跳地址，示例 alipays://platformapi/startapp?appId=2021004108689505&page=pages/home/index，appId 和 page 需要根据实际情况调整真实数值
							}, // 需要携带的必要参数
							success: () => {
								console.log('成功');
							},
							fail: () => {
								console.log('失败');
							},
						});
					}
				);
			}
		},
		// 支付宝登录
		async onGetAuthorize1() {
			// 获取授权码
			my.getAuthCode({
				scopes: ['auth_base'],
				success: (res) => {
					my.getPhoneNumber({
						success: (res1) => {
							let encryptedData = res1.response;
							encryptedData = JSON.parse(encryptedData);
							let response = encryptedData.response
							this._post('user.usermp/mnpAlipayAuthLogin', {
								code: res.authCode,
								content: response
							}, res => {
								uni.setStorageSync('token', res.data.data.token);
								uni.setStorageSync('user_id', res.data.data
									.user_id);
								uni.showToast({
									title: '登录成功'
								});
								this.getData();
								this.tokendata1 = uni.getStorageSync('token');
							})
						},
						fail: (res) => {
							console.log("失败")
							reject(res);
						}
					});
				},
			});
		},
		// 拒绝操作
		onAuthError() {
			uni.showModal({
				title: "提示",
				content: "取消授权，可能导致服务无法使用，或者页面显示不完整",
				success: function (res) {
					if (res.confirm) {
						console.log("取消授权")
					} else {
						console.log("重新授权")
					}
				}
			})
		},
		close() {
			this.showqx = false;
		},
		fuzhi(nr) {
			// console.log(nr);
			uni.setClipboardData({
				data: nr, // e是你要保存的内容
				success: function () {
					uni.showToast({
						title: '复制成功',
						icon: 'none'
					})
				}
			})
		},
		qrz(id) {
			uni.navigateTo({
				url: '/pages/order/smrz?order_id=' + id
			})
		},
		// async orderChain() {
		// 	let self = this

		// 	// 获取当前时间戳
		// 	let time = Date.now()
		// 	if (self.ant_sign_expire < time) {
		// 		uni.showLoading();
		// 		await self.createWithholdSign(self.order_id);
		// 		uni.hideLoading();
		// 	}

		// 	console.log("click order chain")

		// 	my.navigateToMiniProgram({
		// 		appId: "2021001152620480", // 区块链合同真实appId
		// 		path: "pages/tripartite/index", // 支付宝商家跳转区块链合同代扣签署地址（真实路径
		// 		query: {
		// 			signStr: self.signStr,
		// 			tenantId: "GENUZFHR",
		// 			merchantId: "91440101MA5CC14P5M",
		// 			orderId: self.order_no,
		// 			redirectUrl: "alipays://platformapi/startapp?appId=2021004137655397&page=pages/index/index", // 代扣签署成功/失败回跳地址，示例 alipays://platformapi/startapp?appId=2021004108689505&page=pages/home/index，appId 和 page 需要根据实际情况调整真实数值
		// 		}, // 需要携带的必要参数
		// 		success: () => {
		// 			console.log('成功');
		// 		},
		// 		fail: () => {
		// 			console.log('失败');
		// 		},
		// 	});
		// },
		async createWithholdSign(row) {
			let self = this;
			return new Promise((resolve, reject) => {
				self._post('/order.Orderchain/createWithholdSign', {
					order_id: row
				},
					function (res) {
						self.signStr = res.data.signStr;

						resolve(res.data.signStr);
					})
			});
		},
		// 去付款
		payyj(id) {
			console.log(id, '=---payyj');
			let self = this;
			self._post('/order.order/pay', {
				order_id: id
			},
				function (res) {
					// console.log(res, "res");
					my.tradePay({
						orderStr: res
							.data, //orderStr从第一步：生成资金冻结订单，从服务端获取
						success: (res) => {
							// 成功
							uni.reLaunch({
								url: '/pages/order/order-detail?order_id=' + id
							})
						},
						fail: (res) => {
							uni.showToast({
								title: '支付失败！',
								icon: 'none'
							})
						}
					});
				})
		},

		querySignFlow(data) {
			let self = this;
			self._post(
				'order.orderchain/querySignFlow', {
				signNo: data,
				is_post: true
			},
				function (res) {
					console.log(res)
					self.querySignFlow_status = res.data.status
				})
		},
		/*获取数据*/
		getData() {
			let self = this;
			let order_id = self.order_id;
			let url = 'user.order/detail';
			if (this.source == 'supplier') {
				url = 'supplier.order/detail';
			}
			self._get(url, {
				order_id: order_id,
				pay_source: self.getPlatform()
			},
				function (res) {
					self.order_service = res.data.order_service
					self.order_service_price = res.data.order_service_price
					self.order_no = res.data.order.order_no
					self.signStr = res.data.order.ant_sign_str
					self.ant_status = res.data.order.ant_status
					self.flowId = res.data.order.flowId
					self.folwid = res.data.order.folwid
					self.is_user = res.data.order.is_user
					self.folwid3 = res.data.order.folwid3
					self.accountId = res.data.order.accountId
					self.sign_str_status = res.data.order.sign_str_status
					self.signNo = res.data.order.signNo
					if (self.signNo !== '') {
						self.querySignFlow(self.signNo)
					}
					// 蚂蚁链合同过期时间戳
					self.ant_sign_expire = res.data.order.ant_sign_expire

					var dsp = 0;
					if (res.data.order.hasrenzheng_id) {
						if (dsp < 10) {
							self.timer = setInterval(function () {
								dsp += 1
								if (dsp > 3) {
									clearInterval(self.timer);
									self.timer = null;
								}
								self._post(
									'order.authentication/queryAuthentication', {
									hasrenzheng_id: res.data.order.hasrenzheng_id,
								},
									function (result) {
										if (result.code == 1) {
											clearInterval(self.timer);
											self.timer = null;
											self.qurzshow = false;
										}

									}
								);

							}, 1000);
						} else {
							clearInterval(self.timer);
							self.timer = null;
						}

					}
					// console.log("res返回成功",res.data.order.hasrenzheng_id);
					self.portrait = res.data.order.portrait;
					self.fasuzheng = res.data.fasuzheng
					self.hasrenzheng_id = res.data.order.hasrenzheng_id;
					// if (self.portrait == '' && self.hasrenzheng_id != '') {
					// 	self._post('order.authentication/queryAttestation', {
					// 			flowid: self.hasrenzheng_id,
					// 			order_id: order_id
					// 		},
					// 		function(res) {
					// 			self.loading = false;
					// 			uni.hideLoading();
					// 		})
					// }
					self.expressList = res.data.expressList;
					self.detail = res.data.order;
					console.log(self.detail.state_text, 'state_text')
					// console.log("detail", self.detail.product[0].product_attr);
					var str2 = self.detail.product[0].product_attr;
					// console.log(str2.indexOf("不") != -1, str2, "是否存在");
					if (str2.indexOf("不") != -1) {
						// console.log("存在");
						self.suiping = false;
					} else {
						self.suiping = true;
					}
					self.detail.buyOutPrice = res.data.buyOutPrice;
					self.start_time = self.detail.start_time;
					self.end_time = self.detail.end_time
					// let str1 = self.detail.create_time;
					// if (str1.indexOf("2024") != -1) {
					// 	// console.log("存在");
					// 	// console.log(str1.replace(/2023/,"2024"));
					// 	self.end_time = str1.replace(/2024/, "2025");
					// }
					self.orderBill = res.data.orderBill;
					self.extractStore = res.data.order.extractStore;
					self.service_open = res.data.setting.service_open;
					// console.log(res.data.order.deposit, res.data.order.yushou, res.data.order.zhuanzujin, "开始3");
					let yushoudata = res.data.order.yushou;
					let depositdata = res.data.order.deposit;
					let zhuanzujinData = res.data.order.zhuanzujin;
					let buyOutPricedata = res.data.buyOutPrice;
					if (res.data.order.maiduan_no == '') {
						buyOutPricedata = 0;
					}
					if (res.data.order.is_yushou != 2) {
						yushoudata = 0;
					}
					self.detail.TotalPriceGoods = (Number(self.detail.total_price) - Number(depositdata) - Number(
						zhuanzujinData)).toFixed(2);
					if (res.data.order.auth_no == '') {
						depositdata = 0;
					}
					let ysqyjze = Number(zhuanzujinData) + Number(depositdata);
					let numTitol1 = Number(depositdata) + Number(yushoudata) + Number(zhuanzujinData);
					let orderBill = res.data.orderBill;
					let priceJg = 0;
					let priceWF = 0;
					let payable = 0;
					for (var i = 0; i < orderBill.length; i++) {
						if (orderBill[i].is_pay_status == 1) {
							priceJg = Number(priceJg) + Number(orderBill[i].price);
							if (orderBill[i].transaction_id != null) {
								payable = Number(payable) + Number(orderBill[i].price);
								// console.log(orderBill[i].transaction_id, "orderBill[i].transaction_id ");
							}
						}
						if (orderBill[i].is_pay_status == 0) {
							priceWF = Number(priceWF) + Number(orderBill[i].price);
						}


						// console.log("is_pay_status",orderBill[i].is_pay_status);
						if (orderBill[i].is_pay_status == 0 || orderBill[i].is_pay_status == 2) {
							// console.log("i",i);
							if (i >= 1) {
								if (orderBill[i - 1].is_pay_status != 1) {
									orderBill[i].xxx = false;
								} else {
									orderBill[i].xxx = true;
								}
							} else {
								orderBill[i].xxx = true;
							}
						}

					}
					console.log(self.priceJg, 'price')
					self.priceWF = priceWF.toFixed(2);
					// console.log("总价格", numTitol1, priceJg);
					// console.log("计算", Number(numTitol1) + Number(priceJg));
					self.numTitol = (Number(numTitol1) + Number(priceJg) + Number(buyOutPricedata)).toFixed(2);
					// self.payable = (Number(payable) + Number(ysqyjze) + Number(yushoudata)).toFixed(2);
					// self.payable = Number(payable).toFixed(2);
					// console.log(str2.indexOf("不") != -1, str2, "是否存在");
					if (str2.indexOf("不") != -1) {
						self.priceJg = Number(priceJg).toFixed(2);
					} else {
						if (self.detail.is_yushou == 2) {
							self.priceJg = Number(priceJg).toFixed(2);
						} else {
							self.priceJg = Number(priceJg).toFixed(2);
						}
					}
					self.priceJg = priceJg
					// 预付金额
					// + Number(yushoudata) +1
					if (res.data.setting.mp_service == null) {
						self.service_type = 10;
					} else {
						self.service_type = res.data.setting.mp_service.service_type;
					}
					if (res.data.show_alipay) {
						self.showAlipay = true;
					}
					self.loadding = false;
					uni.hideLoading();
				}
			);
		},
		returned(order_id) {
			if (this.detail.order_returned) {
				uni.showModal({
					title: '提示',
					content: '二次归还徐联系客服处理！',
					showCancel: false,
					confirmText: '去联系客服',
					success: function (res) {
						if (res.confirm) {
							uni.reLaunch({
								url: '/pages/recycle/recycle'
							});
						}
					}
				});
				return
			}
			uni.navigateTo({
				url: './returned?order_id=' + order_id
			})
		},
		submit(item) {
			const self = this;
			if (self.source !== 'user') {
				return
			}
			// 通过 ant_trade_no 走代扣
			if (item.ant_trade_no) {
				return this.withHoldPay(item);
			};

			self.loading = true;
			uni.showLoading({
				title: '加载中'
			});
			self._post('/user.order/billPay', {
				bill_id: item.bill_id
			},
				function (res) {
					self.loading = false;
					uni.hideLoading();
					pay(res, self, self.paySuccess, self.payError);
				}
			);
		},
		withHoldPay(item) {
			const self = this,
				tradeNO = item.ant_trade_no;
			my.tradePay({
				tradeNO,
				success: () => {
					self._post('/order.orderchain/queryActivePay', {
						order_id: item.order_id,
						period: item.current_period
					});
				},
				fail: res => console.log(res)
			});
		},
		maiduan(id) {
			let self = this;
			self.loading = true;
			uni.showLoading({
				title: '加载中'
			});
			self._post('/order.order/buyOut', {
				order_id: id
			},
				function (res) {
					self.loading = false;
					uni.hideLoading();
					pay(res, self, self.paySuccess, self.payError);
				})
		},
		/*显示支付方式*/
		hidePopupFunc() {
			this.isPayPopup = false;
		},

		/*取消订单*/
		queding() {
			let self = this;
			// console.log(JSON.stringify(self.checkboxValue1), self.order_id);
			let reason = JSON.stringify(self.checkboxValue1);
			// return
			uni.showLoading({
				title: '正在处理'
			});
			let status = ""
			if (self.state_text == "待发货") {
				status = 1
			} else {
				status = 0
			}
			self._get(
				'user.order/cancel', {
				order_id: self.order_id,
				reason: reason,
				status: status
			},
				function (res) {
					uni.hideLoading();
					uni.showToast({
						title: '操作成功',
						duration: 2000,
						icon: 'success'
					});
					self.listData = [];
					self.showqx = false;
					self.getData();
				}
			);
		},
		cancelOrder(e, item) {
			let self = this;
			let order_id = e;
			self.state_text = item;
			self.order_id = e;
			this.showqx = true;
		},

		/*确认收货*/
		orderReceipt(order_id) {
			let self = this;
			wx.showModal({
				title: '提示',
				content: '您确定要收货吗?',
				success: function (o) {
					if (o.confirm) {
						uni.showLoading({
							title: '正在处理'
						});
						self._post(
							'user.order/receipt', {
							order_id: order_id
						},
							function (res) {
								uni.hideLoading();
								uni.showToast({
									title: res.msg,
									duration: 2000,
									icon: 'success'
								});
								self.getData();
							}
						);
					}
				}
			});
		},
		// 提前返还
		earlyTermination(order_id) {
			uni.showLoading({
				title: '正在加载'
			})
			this._post('/order.order/earlyEnd', {
				order_id: order_id
			}, res => {
				uni.hideLoading()
				if (res.code == 124) {
					// console.log("成功")
					uni.showToast({
						title: res.msg,
						icon: 'none',
					})
					setTimeout(() => {
						uni.navigateBack({
							delta: 1,
						})
					}, 700)
					return
				} else {
					pay(res, this);
				}
			})


		},
		/*查看物流*/
		gotoExpress(order_id) {
			this.gotoPage('/pages/order/express/express?order_id=' + order_id);
		},
		/*申请售后*/
		onApplyRefund(e) {
			this.gotoPage('/pages/order/refund/apply/apply?order_product_id=' + e);
		},

		/*去支付 */
		payTypeFunc(payType) {
			let self = this;
			let order_id = self.order_id;
			self.isPayPopup = false;
			uni.showLoading({
				title: '加载中'
			});
			self._post(
				'user.order/pay', {
				payType: payType,
				order_id: order_id,
				pay_source: self.getPlatform()
			},
				function (res) {
					uni.hideLoading();
					pay(res, self);
				}
			);
		},

		/*支付方式选择  */
		onPayOrder(orderId) {
			let self = this;
			self.gotoPage('/pages/order/cashier?order_type=1&order_id=' + orderId)
		},
		gotoProduct(item) {
			this.gotoPage('/pages/product/detail/detail?product_id=' + item.product_id);
		},
		tochat() {
			if (this.service_type == 10) {
				this.isMpservice = true;
			}
			if (this.service_type == 20) {
				this.gotoPage('/pages/plus/chat/chat?user_id=' + this.detail.supplier.supplier_user_id +
					'&shop_supplier_id=' + this.detail.supplier
						.shop_supplier_id + "&nickName=" + this.detail.supplier.name + '&order_id=' + this
						.order_id);
			}
		},
		changeRadio(e) {
			this.status = e.detail.value;
		},
		Cancel() {
			let self = this;
			wx.showModal({
				title: '提示',
				content: '您确定审核吗?',
				success: function (o) {
					if (o.confirm) {
						uni.showLoading({
							title: '正在处理'
						});
						self._post(
							'supplier.order/confirmCancel', {
							order_id: self.detail.order_id,
							is_cancel: self.status,
							cancel_refuse: self.cancel_refuse
						},
							function (res) {
								uni.hideLoading();
								self.showSuccess(res.msg);
								self.getData();
							}
						);
					}
				}
			});
		},
		changeSelect(e) {
			// console.log(e);
			this.express_name = this.expressList[e.detail.value].express_name;
			this.express_id = this.expressList[e.detail.value].express_id;
		},
		sendPro() {
			let self = this;
			wx.showModal({
				title: '提示',
				content: '您确定要发货吗?',
				success: function (o) {
					if (o.confirm) {
						uni.showLoading({
							title: '正在处理'
						});
						self._post(
							'supplier.order/delivery', {
							order_id: self.detail.order_id,
							express_id: self.express_id,
							express_no: self.express_no
						},
							function (res) {
								uni.hideLoading();
								self.showSuccess(res.msg);
								self.getData();
							}
						);
					}
				}
			});
		}
	}
};
</script>

<style scoped lang="scss">
.more-btn {
	// ”更多“文字按钮
	width: 100rpx;
	height: 100%;
	line-height: 50rpx;
	text-align: center;
	font-size: 24rpx;
	color: #999999;

	.more-btn-box {
		left: -30rpx;
		top: 0;
		transform: translateY(-100%);
		width: 100vw;
		height: 100vh;
	}
}

.yuanyin {
	text-align: center;
	border-bottom: 1rpx solid #A5A5A5;
	padding: 23rpx;
	font-size: 32rpx;
	color: #000000;
	line-height: 44rpx;
}

.cover_img image {
	width: 180rpx;
	height: 180rpx;
}

.Choose {
	padding: 20rpx;
	background-color: #FFFFFF;

	.method {
		display: flex;
		padding: 10rpx 20rpx;
		color: #1296db;
		justify-content: space-between;
		font-size: 30rpx;
	}
}

.fxuankuang {
	padding: 20rpx 40rpx;
}

.anniu-confim {
	background: #11A0AE;
	font-size: 36rpx;
	color: #fff;
}

.radioStyle {
	height: 76rpx;
	font-weight: 500;
	font-size: 28rpx;
	color: #252628;
	line-height: 48rpx;
}

.anniuXq {
	position: fixed;
	bottom: 20rpx;
	height: 98rpx;
	width: 100%;
	display: flex;
	font-size: 36rpx;

	button {
		flex: 1;
	}
}

.tis {
	margin: 0 20rpx;
	overflow: hidden;

	.tishi {
		font-size: 22rpx;
		color: DarkOrange;
		background-color: LightYellow;
		line-height: 35rpx;
	}
}

.u-radio__text {
	color: #000 !important;
}

.total-box {
	height: 90rpx;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: #C3E6FC;
	border-radius: 50rpx;
	margin: 15rpx 30rpx;

	.biank {
		width: 300rpx;
		height: 80rpx;
		border: 1rpx;
		display: flex;
		flex-direction: row;

		image {
			height: 80rpx;
			width: 80rpx;
		}

		view {
			font-size: 20rpx;
			line-height: 80rpx;
			margin-left: 5rpx;
		}
	}
}

.qz {
	margin: 20rpx auto;
	width: 650rpx;
	height: 92rpx;
	background: #EBFAF9;
	border-radius: 46rpx;
	padding: 0 42rpx;
	box-sizing: border-box;

	.biank3 {
		padding: 15rpx;

		image {
			width: 64rpx;
			height: 64rpx;
		}

		.cont {
			.sq1 {
				font-size: 24rpx;
				font-weight: 500;
				color: #151515;
				line-height: 24rpx;
			}

			.sq2 {
				font-size: 20rpx;
				font-weight: 400;
				color: #928f91;
				line-height: 20rpx;
			}
		}
	}
}

.order-express {
	background: #ffffff;
	margin: 0 20rpx;
	border-radius: 12rpx;
	margin-top: 20rpx;
}

.order-express .icon-box .iconfont {
	font-size: 50rpx;
}

.order-datail {
	padding-bottom: 90 rpx;
	background-color: #F2F2F2;
}

.order-datail .fight-users {
	margin: 0 auto;
}

.order-datail .fight-users .user-box {
	width: 80rpx;
	height: 80rpx;
	margin: 10rpx;
	border-radius: 50%;
	border: 1px dashed #cccccc;
}

.order-datail .fight-users {
	padding: 30rpx;
}

.order-datail .fight-users .user-box image {
	width: 80rpx;
	height: 80rpx;
	border-radius: 50%;
}

.order-datail .fight-users .user-box .leader {
	position: absolute;
	top: -20rpx;
	left: 50%;
	margin-left: -30rpx;
	width: 60rpx;
	height: 30rpx;
	line-height: 30rpx;
	text-align: center;
	color: #ffffff;
	border-radius: 30rpx;
	border: 1px solid #ffffff;
	background: red;
}

.order-datail .fight-users .user-box.user-who {
	font-size: 50rpx;
	color: #999999;
}

.state-cont .countdown-datetime {
	margin-top: 16rpx;
}

.state-cont .countdown-datetime text {
	padding: 4rpx 8rpx;
	border-radius: 4rpx;
	// background: rgba(0, 0, 0, .4);
}

.icon-dianpu1 {
	margin-right: 15rpx;
}

.kefu {
	border-top: 1rpx solid #cacaca;
	display: flex;
	justify-content: center;
	align-items: center;
}

.kefu .icon-kefu2 {
	color: #1296db;
	margin-right: 8rpx;
}

.group {
	margin: 0 20rpx;
	margin-top: 20rpx;
	border-radius: 12rpx;
	margin-bottom: 10rpx;
}

.foot-btns {
	padding-bottom: 40rpx;
	height: 100rpx;
	justify-content: space-between;
}

.foot-btns button {
	color: #FFFFFF;
	height: 80rpx;
	display: flex;
	justify-content: center;
	align-items: center;
	border-radius: 30rpx;
	// width: 200rpx;
	background-color: #1296db;
	padding: 0 0.1rem;
	box-sizing: border-box;
}

.table-item {
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: #FFFFFF;
	border-radius: 8rpx;
	padding: 26rpx;
	box-sizing: border-box;
}

.selectpicker {
	width: 400rpx;
	height: 65rpx;
	line-height: 65rpx;
	padding: 0 23rpx;
	box-sizing: border-box;
	border: 2rpx solid #BFBFBF;
	border-radius: 5rpx;
	font-size: 26rpx;
	font-weight: 500;
	color: #575757;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.selectpicker .jiantou {
	color: #575757;
	font-size: 22rpx;
}

.send_btn {
	width: 200rpx;
	margin: 0 auto;
}

.w120 {
	width: 120rpx;
}

.order-state {
	background: #e6f4f4;
	color: #02c9bb;
}

.items {
	display: flex;
	flex-direction: row;
	justify-content: space-between;
	align-items: center;

	.btns {
		width: 128rpx;
		height: 50rpx;
		text-align: center;
		border-radius: 50rpx;
		background: #5bc5ba;
		line-height: 50rpx;
		color: #FFF;
	}

	.btns2 {
		width: 128rpx;
		height: 50rpx;
		text-align: center;
		border-radius: 50rpx;
		background: #999;
		line-height: 50rpx;
		color: #FFF;
	}

	.btns3 {
		width: 128rpx;
		height: 50rpx;
		text-align: center;
		border-radius: 50rpx;
		background: #53C21D;
		line-height: 50rpx;
		color: #FFF;
	}

	.btns4 {
		width: 100rpx;
		height: 50rpx;
		text-align: center;
		border-radius: 50rpx;
		background: #E45656;
		line-height: 50rpx;
		color: #FFF;
	}
}

.beizhu1 {
	display: flex;
	justify-content: flex-start;
	align-items: center;
	font-weight: bold;
	color: black;
	font-size: 34rpx;
}
</style>